﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Iworld.Client.Framework
{
    /// <summary>
    /// 有子页面的视图模型基类
    /// </summary>
    public　abstract class SubPageFrameViewModelBase : MainFrameViewModelBase
    {
        string[] pageNames;
        string subPageName;

        /// <summary>
        /// 当前的页面名称的所有路径
        /// </summary>
        public string[] PageNames
        {
            get { return pageNames; }
            set
            {
                if (this.pageNames != value)
                {
                    this.pageNames = value;
                    this.OnPropertyChanged("PageNames");
                }
            }
        }
        /// <summary>
        /// 第一层子页面
        /// </summary>
        public string SubPageName
        {
            get { return subPageName; }
            set
            {
                if (this.subPageName != value)
                {
                    this.subPageName = value;
                    this.OnPropertyChanged("SubPageName");
                }
            }
        }


        public SubPageFrameViewModelBase(params string[] pageNames)
            : base(pageNames == null || pageNames.Length == 0 ? null : pageNames[0])
        {
            this.PageNames = pageNames;
            if (PageNames != null && PageNames.Length > 1)
            {
                SubPageName = PageNames[1];
            }
        }
    }

    public enum PageCategory
    {
        用户信息,充值服务,金币管理,游戏记录
    }
}
